package AJava1月.EJava第五周.练习题02;

import java.util.Scanner;

public class A求商和余数 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("请您输入被除数");
        int a = sc.nextInt();
        System.out.println("请您输入除数");
        int b = sc.nextInt();
        int  c = 0;
        while (a >= b){
            a = a - b;
            c++;
        }
        System.out.println("商为"+c+"余数为"+a);

    }
}
